public static function ParagonIE_Sodium_Core32_Ed25519::secretkey in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core32/Ed25519.php \ParagonIE_Sodium_Core32_Ed25519::secretkey()
@internal You should not use this directly from another application
Parameters
string $keypair:
Return value
string
Throws
TypeError
1 call to ParagonIE_Sodium_Core32_Ed25519::secretkey()
- ParagonIE_Sodium_Compat::crypto_sign_secretkey in vendor/
paragonie/ sodium_compat/ src/ Compat.php - Extract an Ed25519 secret key from an Ed25519 keypair.
File
- vendor/
paragonie/ sodium_compat/ src/ Core32/ Ed25519.php, line 61
Class
- ParagonIE_Sodium_Core32_Ed25519
- Class ParagonIE_Sodium_Core32_Ed25519
Code
public static function secretkey($keypair) {
if (self::strlen($keypair) !== self::KEYPAIR_BYTES) {
throw new RangeException('crypto_sign keypair must be 96 bytes long');
}
return self::substr($keypair, 0, 64);
}