|
@@ -381,13 +381,17 @@ extension RSA {
|
|
/// /// You now have a CryptoSwift RSA Key
|
|
/// /// You now have a CryptoSwift RSA Key
|
|
/// ```
|
|
/// ```
|
|
///
|
|
///
|
|
- func externalRepresentation() throws -> Data {
|
|
|
|
|
|
+ public func externalRepresentation() throws -> Data {
|
|
if self.primes != nil {
|
|
if self.primes != nil {
|
|
return try Data(self.privateKeyDER())
|
|
return try Data(self.privateKeyDER())
|
|
} else {
|
|
} else {
|
|
return try Data(self.publicKeyDER())
|
|
return try Data(self.publicKeyDER())
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public func publicKeyExternalRepresentation() throws -> Data {
|
|
|
|
+ return try Data(self.publicKeyDER())
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// MARK: CS.BigUInt extension
|
|
// MARK: CS.BigUInt extension
|