Merge pull request #1927 from mpcomplete/keypair

flx: Remove deprecated KeyPair class.
This commit is contained in:
Matt Perry 2015-11-04 13:13:37 -05:00
commit ec7291a2f4

View File

@ -161,16 +161,3 @@ AsymmetricKeyPair keyPairFromPrivateKeyBytes(List<int> privateKeyBytes) {
ECPublicKey publicKey = _publicKeyFromPrivateKey(privateKey);
return new AsymmetricKeyPair(publicKey, privateKey);
}
// TODO(mpcomplete): remove this class when flutter_tools is updated.
class KeyPair extends AsymmetricKeyPair {
KeyPair(PublicKey publicKey, PrivateKey privateKey)
: super(publicKey, privateKey);
static KeyPair readFromPrivateKeySync(String privateKeyPath) {
AsymmetricKeyPair pair = keyPairFromPrivateKeyFileSync(privateKeyPath);
if (pair == null)
return null;
return new KeyPair(pair.publicKey, pair.privateKey);
}
}