Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
<?php
1
<?php
-
 
2
declare(strict_types=1);
2
namespace ParagonIE\ConstantTime;
3
namespace ParagonIE\ConstantTime;
Línea 3... Línea 4...
3
 
4
 
4
/**
5
/**
5
 *  Copyright (c) 2016 - 2017 Paragon Initiative Enterprises.
6
 *  Copyright (c) 2016 - 2022 Paragon Initiative Enterprises.
6
 *  Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
7
 *  Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
7
 *
8
 *
8
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
9
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
9
 *  of this software and associated documentation files (the "Software"), to deal
10
 *  of this software and associated documentation files (the "Software"), to deal
Línea 32... Línea 33...
32
{
33
{
33
    /**
34
    /**
34
     * Convert a binary string into a hexadecimal string without cache-timing
35
     * Convert a binary string into a hexadecimal string without cache-timing
35
     * leaks
36
     * leaks
36
     *
37
     *
37
     * @param string $bin_string (raw binary)
38
     * @param string $binString (raw binary)
38
     * @return string
39
     * @return string
39
     */
40
     */
40
    public static function encode($bin_string);
41
    public static function encode(string $binString): string;
Línea 41... Línea 42...
41
 
42
 
42
    /**
43
    /**
43
     * Convert a binary string into a hexadecimal string without cache-timing
44
     * Convert a binary string into a hexadecimal string without cache-timing
44
     * leaks
45
     * leaks
45
     *
46
     *
-
 
47
     * @param string $encodedString
46
     * @param string $encoded_string
48
     * @param bool $strictPadding Error on invalid padding
47
     * @return string (raw binary)
49
     * @return string (raw binary)
48
     */
-
 
49
    public static function decode($encoded_string);
-
 
50
}
50
     */
-
 
51
    public static function decode(string $encodedString, bool $strictPadding = false): string;
-
 
52
}