PHP 클래스 Jose\Util\RSA

파일 보기 프로젝트 열기: spomky-labs/jose 1 사용 예제들

공개 메소드들

메소드 설명
decrypt ( RSAKey $key, string $ciphertext, string $hash_algorithm ) : string Decryption.
encrypt ( RSAKey $key, string $plaintext, string $hash_algorithm ) : string Encryption.
sign ( RSAKey $key, string $message, string $hash ) : string Create a signature.
verify ( RSAKey $key, string $message, string $signature, string $hash ) : boolean Verifies a signature.

비공개 메소드들

메소드 설명
convertIntegerToOctetString ( BigInteger $x, integer $xLen ) : string Integer-to-Octet-String primitive.
convertOctetStringToInteger ( string $x ) : BigInteger Octet-String-to-Integer primitive.
encodeEMSAPSS ( string $m, integer $emBits, Hash $hash ) : string | boolean EMSA-PSS-ENCODE.
encryptRSAESOAEP ( RSAKey $key, string $m, Hash $hash ) : string RSAES-OAEP-ENCRYPT.
exponentiate ( RSAKey $key, BigInteger $c ) : BigInteger Exponentiate with or without Chinese Remainder Theorem.
getMGF1 ( string $mgfSeed, integer $maskLen, Hash $mgfHash ) : string MGF1.
getRSADP ( RSAKey $key, BigInteger $c ) : BigInteger | false RSA DP.
getRSAEP ( RSAKey $key, BigInteger $m ) : BigInteger | false RSA EP.
getRSAESOAEP ( RSAKey $key, string $c, Hash $hash ) : string RSAES-OAEP-DECRYPT.
getRSASP1 ( RSAKey $key, BigInteger $m ) : BigInteger | false RSA SP1.
getRSAVP1 ( RSAKey $key, BigInteger $s ) : BigInteger | false RSAVP1.
verifyEMSAPSS ( string $m, string $em, integer $emBits, Hash $hash ) : boolean EMSA-PSS-VERIFY.

메소드 상세

decrypt() 공개 정적인 메소드

Decryption.
public static decrypt ( RSAKey $key, string $ciphertext, string $hash_algorithm ) : string
$key Jose\KeyConverter\RSAKey
$ciphertext string
$hash_algorithm string
리턴 string

encrypt() 공개 정적인 메소드

Encryption.
public static encrypt ( RSAKey $key, string $plaintext, string $hash_algorithm ) : string
$key Jose\KeyConverter\RSAKey
$plaintext string
$hash_algorithm string
리턴 string

sign() 공개 정적인 메소드

Create a signature.
public static sign ( RSAKey $key, string $message, string $hash ) : string
$key Jose\KeyConverter\RSAKey
$message string
$hash string
리턴 string

verify() 공개 정적인 메소드

Verifies a signature.
public static verify ( RSAKey $key, string $message, string $signature, string $hash ) : boolean
$key Jose\KeyConverter\RSAKey
$message string
$signature string
$hash string
리턴 boolean