| Index: Source/modules/crypto/AesKeyAlgorithm.cpp
|
| diff --git a/Source/modules/crypto/Algorithm.cpp b/Source/modules/crypto/AesKeyAlgorithm.cpp
|
| similarity index 74%
|
| copy from Source/modules/crypto/Algorithm.cpp
|
| copy to Source/modules/crypto/AesKeyAlgorithm.cpp
|
| index 35568ff46e53cd840dc945fad6df50f12beff7be..1fc8188b8e5fc2528cae7813989b42ee2e525ef4 100644
|
| --- a/Source/modules/crypto/Algorithm.cpp
|
| +++ b/Source/modules/crypto/AesKeyAlgorithm.cpp
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2013 Google Inc. All rights reserved.
|
| + * Copyright (C) 2014 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -29,27 +29,33 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "modules/crypto/Algorithm.h"
|
| +#include "modules/crypto/AesKeyAlgorithm.h"
|
|
|
| #include "modules/crypto/NormalizeAlgorithm.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace WebCore {
|
|
|
| -PassRefPtrWillBeRawPtr<Algorithm> Algorithm::create(const blink::WebCryptoAlgorithm& algorithm)
|
| +PassRefPtrWillBeRawPtr<AesKeyAlgorithm> AesKeyAlgorithm::create(const blink::WebCryptoKeyAlgorithm& algorithm)
|
| {
|
| - return adoptRefWillBeNoop(new Algorithm(algorithm));
|
| + return adoptRefWillBeNoop(new AesKeyAlgorithm(algorithm));
|
| }
|
|
|
| -Algorithm::Algorithm(const blink::WebCryptoAlgorithm& algorithm)
|
| - : m_algorithm(algorithm)
|
| +unsigned short AesKeyAlgorithm::length()
|
| {
|
| - ScriptWrappable::init(this);
|
| + return m_algorithm.aesParams()->lengthBits();
|
| }
|
|
|
| -String Algorithm::name()
|
| +void AesKeyAlgorithm::trace(Visitor* visitor)
|
| {
|
| - return algorithmIdToName(m_algorithm.id());
|
| + KeyAlgorithm::trace(visitor);
|
| +}
|
| +
|
| +AesKeyAlgorithm::AesKeyAlgorithm(const blink::WebCryptoKeyAlgorithm& algorithm)
|
| + : KeyAlgorithm(algorithm)
|
| +{
|
| + ASSERT(m_algorithm.aesParams());
|
| + ScriptWrappable::init(this);
|
| }
|
|
|
| } // namespace WebCore
|
|
|